<?php

class Admin_Form_JulgarRecursos extends Twitter_Bootstrap_Form_Horizontal
{

    public function init()
    {

        $modRecurso     = new Admin_Model_Recursos();
        $lstRecursos    = $modRecurso->listarTpRecursos();
        
        $this->setIsArray(true)
             ->setElementsBelongTo('');       
        
        $this->setAction('/admin/recursos/julgar-recursos')
             ->setName('Form_ValidarInvalidar')
             ->setAttrib('id', 'form_validar_invalidar')
             ->setMethod('post');
        
       
        $this->addElement('text', 'matricula', array('label'        => 'Matrícula:',
                                                     'class'        => '',
                                                     'filters'      => array('StringTrim', 'StripTags'),
                                                     'validators'   => array(array('StringLength', false, array(3,10)))
        
                          ));
        
        
        $this->addElement('select', 'tpRecurso', array('label'         => 'Tipo de Recurso:',
                                                       'multiOptions'  => $lstRecursos
                          ));        



        
        
        
        $this->addElement('select', 'status', array('label'         => 'Status',
                                                    'required'      => true,
                                                    'multiOptions'  => array("1"   => "A julgar",
                                                                             "2"   => "Deferido",
                                                                             "3"   => "Indeferido")
                          ));        
        
        
        $this->addElement('submit', 'btnConsultar', array('label' => 'Consultar',
                                                          'class' => 'btn btn-primary'));
        
    }
}